package cn.kgc.changjian.controller;

import cn.kgc.changjian.pojo.Classes;
import cn.kgc.changjian.pojo.ResultEntity;
import cn.kgc.changjian.service.ClassesService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-25 20:33
 */
@RestController
public class ClassesController {

    @Resource
    ClassesService classesService;

    @RequestMapping("/selectAll")
    public ResultEntity<List<Classes>> selectAll(){
        List<Classes> classes = classesService.selectAll();
        return ResultEntity.successWithoutData(classes);
    }
}
